from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet

from goods.models import SpecificationOption
from meiduo_admin.serializers.options import SpecsOptionsSerialzier

from meiduo_admin.utils import PageNum

# 规格选项表管理
class SpecsOptionsView(ModelViewSet):
    serializer_class = SpecsOptionsSerialzier
    queryset = SpecificationOption.objects.all()
    pagination_class = PageNum

# 规格选项表数据-->获取品牌信息数据
class SpecsSimpleView(ListAPIView):
    serializer_class = SpecsOptionsSerialzier
    queryset = SpecificationOption.objects.all()